import request from '@/utils/request'
import qs from 'qs'

export function initData(url, params) {
  return request({
    url: url + '?' + qs.stringify(params, { indices: false }),
    method: 'get'
  })
}

export function download(url, params) {
  return request({
    url: url + '?' + qs.stringify(params, { indices: false }),
    method: 'get',
    responseType: 'blob'
  })
}

export function checkRevisitVisible(status) {
  return status === 300 || status === 400 || status === 500
}

export function checkEvaluteEditable(status) {
  return status === 600
}

export function checkEvaluteVisible(status) {
  return status === 600 || status === 700
}

export function checkeAssignable(status) {
  return status === 100 || status === 201 || status === 401
}
